package com.ir;

import java.util.ArrayList;
import java.util.List;

import com.ast.FuncDefNode;
import com.ast.FuncRParamsNode;
import com.sysdep.CodeGenerator;

public class Call extends Expr {
    FuncDefNode func;
    List<Expr> exprs;

    public Call(FuncDefNode func, List<Expr> exprs) {
        this.func = func;
        this.exprs = exprs;
    }

    public List<Expr> getExprs() {
        return exprs;
    }

    public FuncDefNode getFunc() {
        return func;
    }

    public String toString() {
        return "Call-" + func.getName();
    }

    @Override
    public boolean accept(CodeGenerator cg) {
        return cg.visit(this);
    }
    @Override
    public int getIntValue() {
        throw new Error("getIntValue() not supported in Assign");
    }
    // public void accept(CodeGenerator cg) {
    // cg.visit(this);
    // }
}
